﻿using System;

namespace diantou.web.ajax.enterprise
{
    /// <summary>
    /// 考试评审
    /// </summary>
    [fastCSharp.code.cSharp.ajax(IsPool = true)]
    class examReviewUser : userHandle<examReviewUser>
    {
        /// <summary>
        /// 获取下一位考试用户标识
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="onReturn"></param>
        [fastCSharp.code.cSharp.ajax(IsOnlyPost = false)]
        public void GetNextUser(int userId, Action<fastCSharp.net.returnValue<int>> onReturn)
        {
            diantou.examDataAccess.tcpCall.exam.getNextUser(userId, currentUser.Id, onReturn);
        }
        /// <summary>
        /// 获取上一位考试用户标识
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="onReturn"></param>
        [fastCSharp.code.cSharp.ajax(IsOnlyPost = false)]
        public void GetPreviousUser(int userId, Action<fastCSharp.net.returnValue<int>> onReturn)
        {
            diantou.examDataAccess.tcpCall.exam.getPreviousUser(userId, currentUser.Id, onReturn);
        }
        /// <summary>
        /// 设置用户状态
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="status"></param>
        /// <param name="onReturn"></param>
        public void SetUserStatus(int userId, diantou.dataModel.examUser.status status, Action<fastCSharp.net.returnValue<bool>> onReturn)
        {
            diantou.examDataAccess.tcpCall.examUser.setStatus(userId, status, currentUser.Id, onReturn);
        }
        /// <summary>
        /// 设置判卷人
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="onReturn"></param>
        public void SetReviewUser(int userId, Action<fastCSharp.net.returnValue<int>> onReturn)
        {
            diantou.examDataAccess.tcpCall.examUser.setReviewUser(userId, currentUser.Id, onReturn);
        }
        /// <summary>
        /// 问答题加分
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="questionId"></param>
        /// <param name="point"></param>
        public void SetQuestionPoint(int userId, int questionId, int point, Action<fastCSharp.net.returnValue<bool>> onReturn)
        {
            diantou.examDataAccess.tcpCall.examAnswer.setQuestionPoint(userId, questionId, point, currentUser.Id, onReturn);
        }
        /// <summary>
        /// 编程题减分
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="problemId"></param>
        /// <param name="point"></param>
        public void SetProblemPoint(int userId, int problemId, int point, Action<fastCSharp.net.returnValue<bool>> onReturn)
        {
            diantou.examDataAccess.tcpCall.examAnswer.setProblemPoint(userId, problemId, point, currentUser.Id, onReturn);
        }
    }
}
